Termination w.r.t. Q of the following Term Rewriting System could not be shown:

Q restricted rewrite system:
The TRS R consists of the following rules:

primes -> sieve1(from1(s1(s1(0))))
from1(X) -> cons2(X, from1(s1(X)))
head1(cons2(X, Y)) -> X
tail1(cons2(X, Y)) -> Y
if3(true, X, Y) -> X
if3(false, X, Y) -> Y
filter2(s1(s1(X)), cons2(Y, Z)) -> if3(divides2(s1(s1(X)), Y), filter2(s1(s1(X)), Z), cons2(Y, filter2(X, sieve1(Y))))
sieve1(cons2(X, Y)) -> cons2(X, filter2(X, sieve1(Y)))

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

primes -> sieve1(from1(s1(s1(0))))
from1(X) -> cons2(X, from1(s1(X)))
head1(cons2(X, Y)) -> X
tail1(cons2(X, Y)) -> Y
if3(true, X, Y) -> X
if3(false, X, Y) -> Y
filter2(s1(s1(X)), cons2(Y, Z)) -> if3(divides2(s1(s1(X)), Y), filter2(s1(s1(X)), Z), cons2(Y, filter2(X, sieve1(Y))))
sieve1(cons2(X, Y)) -> cons2(X, filter2(X, sieve1(Y)))

Q is empty.

Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

FILTER2(s1(s1(X)), cons2(Y, Z)) -> SIEVE1(Y)
FILTER2(s1(s1(X)), cons2(Y, Z)) -> FILTER2(X, sieve1(Y))
FILTER2(s1(s1(X)), cons2(Y, Z)) -> FILTER2(s1(s1(X)), Z)
PRIMES -> SIEVE1(from1(s1(s1(0))))
SIEVE1(cons2(X, Y)) -> SIEVE1(Y)
PRIMES -> FROM1(s1(s1(0)))
FILTER2(s1(s1(X)), cons2(Y, Z)) -> IF3(divides2(s1(s1(X)), Y), filter2(s1(s1(X)), Z), cons2(Y, filter2(X, sieve1(Y))))
SIEVE1(cons2(X, Y)) -> FILTER2(X, sieve1(Y))
FROM1(X) -> FROM1(s1(X))

The TRS R consists of the following rules:

primes -> sieve1(from1(s1(s1(0))))
from1(X) -> cons2(X, from1(s1(X)))
head1(cons2(X, Y)) -> X
tail1(cons2(X, Y)) -> Y
if3(true, X, Y) -> X
if3(false, X, Y) -> Y
filter2(s1(s1(X)), cons2(Y, Z)) -> if3(divides2(s1(s1(X)), Y), filter2(s1(s1(X)), Z), cons2(Y, filter2(X, sieve1(Y))))
sieve1(cons2(X, Y)) -> cons2(X, filter2(X, sieve1(Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

FILTER2(s1(s1(X)), cons2(Y, Z)) -> SIEVE1(Y)
FILTER2(s1(s1(X)), cons2(Y, Z)) -> FILTER2(X, sieve1(Y))
FILTER2(s1(s1(X)), cons2(Y, Z)) -> FILTER2(s1(s1(X)), Z)
PRIMES -> SIEVE1(from1(s1(s1(0))))
SIEVE1(cons2(X, Y)) -> SIEVE1(Y)
PRIMES -> FROM1(s1(s1(0)))
FILTER2(s1(s1(X)), cons2(Y, Z)) -> IF3(divides2(s1(s1(X)), Y), filter2(s1(s1(X)), Z), cons2(Y, filter2(X, sieve1(Y))))
SIEVE1(cons2(X, Y)) -> FILTER2(X, sieve1(Y))
FROM1(X) -> FROM1(s1(X))

The TRS R consists of the following rules:

primes -> sieve1(from1(s1(s1(0))))
from1(X) -> cons2(X, from1(s1(X)))
head1(cons2(X, Y)) -> X
tail1(cons2(X, Y)) -> Y
if3(true, X, Y) -> X
if3(false, X, Y) -> Y
filter2(s1(s1(X)), cons2(Y, Z)) -> if3(divides2(s1(s1(X)), Y), filter2(s1(s1(X)), Z), cons2(Y, filter2(X, sieve1(Y))))
sieve1(cons2(X, Y)) -> cons2(X, filter2(X, sieve1(Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 2 SCCs with 3 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ QDPOrderProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

FILTER2(s1(s1(X)), cons2(Y, Z)) -> SIEVE1(Y)
FILTER2(s1(s1(X)), cons2(Y, Z)) -> FILTER2(X, sieve1(Y))
FILTER2(s1(s1(X)), cons2(Y, Z)) -> FILTER2(s1(s1(X)), Z)
SIEVE1(cons2(X, Y)) -> SIEVE1(Y)
SIEVE1(cons2(X, Y)) -> FILTER2(X, sieve1(Y))

The TRS R consists of the following rules:

primes -> sieve1(from1(s1(s1(0))))
from1(X) -> cons2(X, from1(s1(X)))
head1(cons2(X, Y)) -> X
tail1(cons2(X, Y)) -> Y
if3(true, X, Y) -> X
if3(false, X, Y) -> Y
filter2(s1(s1(X)), cons2(Y, Z)) -> if3(divides2(s1(s1(X)), Y), filter2(s1(s1(X)), Z), cons2(Y, filter2(X, sieve1(Y))))
sieve1(cons2(X, Y)) -> cons2(X, filter2(X, sieve1(Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


FILTER2(s1(s1(X)), cons2(Y, Z)) -> SIEVE1(Y)
FILTER2(s1(s1(X)), cons2(Y, Z)) -> FILTER2(X, sieve1(Y))
FILTER2(s1(s1(X)), cons2(Y, Z)) -> FILTER2(s1(s1(X)), Z)
The remaining pairs can at least be oriented weakly.

SIEVE1(cons2(X, Y)) -> SIEVE1(Y)
SIEVE1(cons2(X, Y)) -> FILTER2(X, sieve1(Y))
Used ordering: Polynomial Order [17,21] with Interpretation:

POL( FILTER2(x1, x2) ) = max{0, 2x2 - 1}


POL( if3(x1, ..., x3) ) = max{0, -3}


POL( sieve1(x1) ) = max{0, 2x1 - 1}


POL( filter2(x1, x2) ) = max{0, -3}


POL( SIEVE1(x1) ) = max{0, 2x1 - 2}


POL( s1(x1) ) = max{0, 3x1 - 3}


POL( divides2(x1, x2) ) = max{0, -3}


POL( cons2(x1, x2) ) = 3x1 + 3x2 + 1



The following usable rules [14] were oriented:

filter2(s1(s1(X)), cons2(Y, Z)) -> if3(divides2(s1(s1(X)), Y), filter2(s1(s1(X)), Z), cons2(Y, filter2(X, sieve1(Y))))
sieve1(cons2(X, Y)) -> cons2(X, filter2(X, sieve1(Y)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ DependencyGraphProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SIEVE1(cons2(X, Y)) -> SIEVE1(Y)
SIEVE1(cons2(X, Y)) -> FILTER2(X, sieve1(Y))

The TRS R consists of the following rules:

primes -> sieve1(from1(s1(s1(0))))
from1(X) -> cons2(X, from1(s1(X)))
head1(cons2(X, Y)) -> X
tail1(cons2(X, Y)) -> Y
if3(true, X, Y) -> X
if3(false, X, Y) -> Y
filter2(s1(s1(X)), cons2(Y, Z)) -> if3(divides2(s1(s1(X)), Y), filter2(s1(s1(X)), Z), cons2(Y, filter2(X, sieve1(Y))))
sieve1(cons2(X, Y)) -> cons2(X, filter2(X, sieve1(Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ DependencyGraphProof
QDP
                    ↳ QDPOrderProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SIEVE1(cons2(X, Y)) -> SIEVE1(Y)

The TRS R consists of the following rules:

primes -> sieve1(from1(s1(s1(0))))
from1(X) -> cons2(X, from1(s1(X)))
head1(cons2(X, Y)) -> X
tail1(cons2(X, Y)) -> Y
if3(true, X, Y) -> X
if3(false, X, Y) -> Y
filter2(s1(s1(X)), cons2(Y, Z)) -> if3(divides2(s1(s1(X)), Y), filter2(s1(s1(X)), Z), cons2(Y, filter2(X, sieve1(Y))))
sieve1(cons2(X, Y)) -> cons2(X, filter2(X, sieve1(Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


SIEVE1(cons2(X, Y)) -> SIEVE1(Y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial Order [17,21] with Interpretation:

POL( cons2(x1, x2) ) = 3x1 + x2 + 1


POL( SIEVE1(x1) ) = 2x1 + 2



The following usable rules [14] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ DependencyGraphProof
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ PisEmptyProof
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

primes -> sieve1(from1(s1(s1(0))))
from1(X) -> cons2(X, from1(s1(X)))
head1(cons2(X, Y)) -> X
tail1(cons2(X, Y)) -> Y
if3(true, X, Y) -> X
if3(false, X, Y) -> Y
filter2(s1(s1(X)), cons2(Y, Z)) -> if3(divides2(s1(s1(X)), Y), filter2(s1(s1(X)), Z), cons2(Y, filter2(X, sieve1(Y))))
sieve1(cons2(X, Y)) -> cons2(X, filter2(X, sieve1(Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP

Q DP problem:
The TRS P consists of the following rules:

FROM1(X) -> FROM1(s1(X))

The TRS R consists of the following rules:

primes -> sieve1(from1(s1(s1(0))))
from1(X) -> cons2(X, from1(s1(X)))
head1(cons2(X, Y)) -> X
tail1(cons2(X, Y)) -> Y
if3(true, X, Y) -> X
if3(false, X, Y) -> Y
filter2(s1(s1(X)), cons2(Y, Z)) -> if3(divides2(s1(s1(X)), Y), filter2(s1(s1(X)), Z), cons2(Y, filter2(X, sieve1(Y))))
sieve1(cons2(X, Y)) -> cons2(X, filter2(X, sieve1(Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.